import pandas as pd

data = pd.read_excel('C:\\Users\\asus\\Desktop\\111.xlsx', sheet_name='111', usecols=['物料编码', '服务类型'])
for index, row in data.iterrows():

    if not pd.isna(row['服务类型']):
        update_sql = """
            update sys_data_dictionary set obj_value2 = '{0}' where obj_code ='{1}';
            """.format(row['服务类型'], row['物料编码'])
        print(update_sql)
